<template>
    <div>
        <!-- 报名后未付款弹框 -->
        <div class="dialogNoPayMask" v-if="nopayData.currentApply!=undefined"></div>
        <div v-if="nopayData.currentApply!=undefined&&nopayData.type==1" class="dialogNoPay">
            <div class="dialogNoPay_title text_center">
                您有一个报名尚未完成
            </div>
            <div class="dialogNoPay_body">
                <dl>
                    <dd class="f_left">订单编号：</dd>
                    <dt class="f_left">{{nopayData.currentApply.tradeNo}}</dt>
                </dl>
                <dl>
                    <dd class="f_left">真实姓名：</dd>
                    <dt class="f_left">{{nopayData.currentApply.realName}}</dt>
                </dl>
                <dl>
                    <dd class="f_left">报考专业：</dd>
                    <dt class="f_left applyNoPayClass">{{nopayData.currentApply.productName}}</dt>
                </dl>
            </div>
            <div class="dialogNoPay_btns text_center" v-if="nopayData.currentApply.applyWay==0">
                <a @click="applyGoOn(nopayData.currentApply.tradeNo)">继续报名</a>
                <a class="apply_delete"  @click="deleteOrder(nopayData.currentApply.tradeNo)">删除订单</a>
            </div>
        </div>
        <!-- 企业 -->
        <div v-if="nopayData.currentApply!=undefined&&nopayData.applyWay==1" class="dialogNoPay" style="height: 352px;">
        	<div class="dialogNoPay_title text_center">
        		您有一个报名尚未完成
        	</div>
        	<div class="dialogNoPay_body">
        		<dl>
        			<dd class="f_left">企业名称：</dd>
        			<dt class="f_left">{{nopayData.currentApply.realName}}</dt>
        		</dl>
        		<dl>
        			<dd class="f_left">订单编号：</dd>
        			<dt class="f_left">{{nopayData.currentApply.tradeNo}}</dt>
        		</dl>
        	</div>
        	<div class="dialogNoPay_btns text_center">
        		<router-link :to="String.Format('/company_apply/company_flow_order/{0}',nopayData.currentApply.tradeNo)">继续报名</router-link>
        		<a class="apply_delete" @click="deleteOrder(nopayData.currentApply.tradeNo)">删除订单</a>
        	</div>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
            }
        },
        props: ["nopayData"],
        mounted: function() {
        },
        methods: {
            applyGoOn: function(tradeNo) {
                var url = String.Format('/apply/flow_order/{0}', tradeNo);
                this.common.toPage(url);
            },
            deleteOrder: function(tradeNo) {
                var that = this;
                this.common.post(this.api.delApply, {
                    tradeNo: tradeNo
                }, function(res) {
                    that.reload();
                });
            },
            reload:function(){
                window.location.reload();
            }
        }
    }
</script>

<style>
</style>
